import { createRouter, createWebHistory } from 'vue-router';
import HelloWorld from '../components/HelloWorld.vue';
import RadioComponent from '../components/RadioComponent.vue';
import TestPage from '../components/TestPage.vue';

const routes = [
    {
        path: '/',
        name: 'HelloWorld',
        component: HelloWorld,
        children: [ // 嵌套路由
            {
                path: 'radio',
                name: 'RadioComponent',
                component: RadioComponent
            },
            {
                path: 'testPage',
                name: 'TestPage',
                component: TestPage
            }
        ]
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;